package timing.ukulele.project.vo;

import timing.ukulele.project.client.callback.FlowClientCallback;
import timing.ukulele.common.ResponseResult;
import timing.ukulele.common.vo.ExecuteVO;
import timing.ukulele.common.vo.TaskVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

@FeignClient(value = "ukulele-flow", path = "flow", fallback = FlowClientCallback.class)
public interface FlowClient {
    @PostMapping("/api/flow/noPreCompleteTask")
    ResponseResult<List<TaskVO>> noPreCompleteTask(@RequestBody ExecuteVO executeVO);

    @PostMapping("/api/flow/start")
    ResponseResult<Map<String, Object>> start(@RequestBody ExecuteVO executeVO);
}
